const { default: axios } = require("axios");
const { dewuHeaders, getDewuQueryStr } = require("../../tools");
const sign = require("../../tools/sign");

/**
 * DEWU-API根据关键字获取搜索关联详情(频繁)
 * @param {import("koa").Context} ctx  - 路由上下文
 *  */
module.exports = async(ctx) => {
    let { title } = ctx.request.query;
    const queryStr = getDewuQueryStr({
        title: title || 'aj',
    })
    const response = await axios.get(
        `https://app.poizon.com/api/v1/h5/search/fire/search/suggestion?${queryStr}`, {
            headers: dewuHeaders(),
        },
    )
    ctx.body = response.data
}